package com.xu.cloud.common.pojo.http.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * http请求基础实体类
 *
 * @author xuguan
 * @since 2023/4/3
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class BaseRequest implements Serializable {
    private static final long serialVersionUID = -8680434887356724604L;

    /**
     * 请求时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime reqTime;

    /**
     * 请求流水号, 长度20
     */
    @Length(max = 20)
    private String reqJournalNo;

    /**
     * 扩展字段
     */
    private Map<String, Object> extra;
}
